let navList = document.getElementsByClassName("nav-list")
for (let i = 0; i < navList.length; i++) {
    navList[i].addEventListener('click', function () {
        for (let x = 0; x < navList.length; x++) {
            navList[x].className = 'nav-list'
        }
        navList[i].className = 'nav-list active'
    }, true)
}

function copyName() {
    var data = [new ClipboardItem({ "text/plain": new Blob(["犬山玉姬巴别塔保护协会"], { type: "text/plain" }) })];
    navigator.clipboard.write(data).then(function () {
        let button = document.getElementsByTagName('button')
        button[0].innerHTML = '已复制到剪贴板'
        setInterval(() => {
            button[0].innerHTML = '点击这里复制行会名'
        }, 2000);
    }, function () {
        console.error("Unable to write to clipboard. :-(");
    });
}

function copyQQNumber() {
    var data = [new ClipboardItem({ "text/plain": new Blob(["1084900445"], { type: "text/plain" }) })];
    navigator.clipboard.write(data).then(function () {
        let button = document.getElementsByTagName('button')
        button[1].innerHTML = '已复制到剪贴板'
        setInterval(() => {
            button[1].innerHTML = '点击这里复制QQ群号'
        }, 2000);
    }, function () {
        console.error("Unable to write to clipboard. :-(");
    });
}

var ctx = document.getElementById('myChart').getContext('2d');
var chart = new Chart(ctx, {
    // 要创建的图表类型
    type: 'line',

    // 数据集
    data: {
        labels: ["8月", "9月", "10月", "11月"],
        datasets: [{
            label: "趋势",
            backgroundColor: 'rgba(255, 99, 132, 0.7)',
            borderColor: '#39619c',
            data: [8134, 7917, 7091, 7341],
        }]
    },

    // 配置选项
    options: {}
});